package reviews.task2;


public class UserScore implements Comparable<UserScore> {


    /**
     * 用户ID
     */
    private String userId;

    /**
     * 评价总次数
     */
    private Integer number;

    public UserScore() {
    }

    public UserScore(String userId, Integer number) {
        this.userId = userId;
        this.number = number;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    @Override
    public int compareTo(UserScore o) {
        return o.getNumber().compareTo(this.getNumber());
    } //排序规则
}
